/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						 abstract_adv_object.h

	$Header: /heroes4/abstract_adv_object.h $

	$NoKeywords: $

 ************************************************************************/

#if !defined( ABSTRACT_ADV_OBJECT_H_INCLUDED )
#define ABSTRACT_ADV_OBJECT_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <memory>

#include "abstract_bitmap.h"
#include "sized_int_types.h"

class t_abstract_adv_object_visitor;
class t_footprint;
enum t_player_color;
struct t_screen_rect;
struct t_screen_point;

/////////////////////////////////////////////////////////////////////////////
// t_abstract_adv_object class

class t_abstract_adv_object
{
public:
	// Types
	typedef std::auto_ptr< t_abstract_adv_object >	t_clone_ptr;
	typedef t_abstract_adv_object_visitor			t_visitor;

	// Destructor
	virtual ~t_abstract_adv_object();
	
	// Member functions
	virtual void				accept( t_visitor & visitor ) = 0;
	virtual void				accept( t_visitor & visitor ) const = 0;
	virtual bool				animates() const = 0;
	virtual bool				can_be_hidden() const;
	virtual t_clone_ptr			clone() const = 0;
	virtual void				draw_shadow_to(
									t_uint32				current_time, 
									t_screen_rect const &	source_rect, 
									t_abstract_bitmap16 &	dest,
									t_screen_point const &	dest_point ) const = 0;
	virtual void				draw_shadow_to(
									t_uint32				current_time, 
									t_abstract_bitmap16 &	dest, 
									t_screen_point const &	dest_point ) const;
	virtual void				draw_subimage_to(
									int						subimage_num,
									t_uint32				current_time,
									t_screen_rect const &	source_rect, 
									t_abstract_bitmap16 &	dest, 
									t_screen_point const &	dest_point,
									int						alpha = 15 ) const = 0;
	virtual void				draw_subimage_to(
									int						subimage_num,
									t_uint32				current_time, 
									t_abstract_bitmap16 &	dest, 
									t_screen_point const &	dest_point ) const;
	virtual void				draw_to(
									t_uint32				current_time, 
									t_screen_rect const &	source_rect,
									t_abstract_bitmap16 &	dest, 
									t_screen_point const &	dest_point ) const = 0;
	virtual void				draw_to(
									t_uint32				current_time, 
									t_abstract_bitmap16 &	dest, 
									t_screen_point const &	dest_point ) const;
	virtual t_footprint const &	get_footprint() const = 0;
	virtual t_player_color		get_player_color() const;
	virtual t_screen_rect		get_rect() const = 0;
	virtual t_screen_rect		get_rect( t_uint32 current_time ) const = 0;
	virtual t_screen_rect		get_shadow_rect() const = 0;
	virtual t_screen_rect		get_shadow_rect( t_uint32 current_time ) const = 0;
	virtual int					get_subimage_count() const = 0;
	virtual int					get_subimage_depth_offset( int subimage_num ) const = 0;
	virtual t_screen_rect		get_subimage_rect( int subimage_num ) const = 0;
	virtual t_screen_rect		get_subimage_rect(
									int			subimage_num,
									t_uint32	time ) const = 0;
	virtual bool				hit_test(
									t_uint32				current_time,
									t_screen_point const &	point ) const = 0;
	virtual bool				is_decorative() const;
	virtual bool				is_visible_to( int team_num ) const;
	virtual bool				needs_redrawing(
									t_uint32	last_update_time,
									t_uint32	current_time ) const = 0;
	virtual bool				subimage_animates( int subimage_num ) const = 0;
	virtual bool				subimage_is_underlay( int subimage_num ) const = 0;
	virtual bool				subimage_needs_redrawing(
									int			subimage_num,
									t_uint32	last_update_time,
									t_uint32	current_time ) const = 0;
	virtual bool				uses_bridge_heights() const;
	virtual bool				visible_through_obstacles( int subimage_num ) const;
};

#endif // !defined( ABSTRACT_ADV_OBJECT_H_INCLUDED )
